package com.it.reggie;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@Slf4j//在代码中输出日志，方便调试
@SpringBootApplication
@ServletComponentScan//想要过滤器生效，需要在启动类上加一个注解@ServletComponentScan,他才会去扫描@WebFilter()注解，从而把过滤器创建出来
@EnableTransactionManagement//使DishServiceImpl里的saveWithFlavor方法上面的@Transactional生效
@EnableCaching//开启开启注解方式的缓存功能
public class ReggieApplication {
      public static void main(String[] args) {
            SpringApplication.run(ReggieApplication.class,args);
            log.info("项目启动成功");
      }
//为了能够访问到resourses下的backend(后端管理页)和front(前端管理页)，编写配置类config(WebMvcConfig)，配置mvc框架的静态资源的映射
}
